home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 May
/
Macworld (1999-05).dmg
/
Shareware World
/
Comms & Internet
/
Net.Dreams Remote Mail 1.0
/
RM-Frames
/
login.remotemail
< prev
next >
Wrap
Text File
|
1999-02-15
|
3KB
|
103 lines
<HTML>
<HEAD>
<TITLE>Remote Mail Login</TITLE>
<script language="JavaScript">
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function setC(form) {
var expdate = new Date ();
expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000 * 31));
SetCookie (form.name, form.value, expdate);
}
// Get Cookie Value function
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1) endstr = document.cookie.length;
return unescape (document.cookie.substring(offset, endstr));
}
// Get Cookie function
function GetCookie(name) {
var arg = name+"=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg) return getCookieVal(j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
//my test
function setValues() {
if (GetCookie('new_user') != null)
document.LoginForm.new_user.value=GetCookie('new_user');
if (GetCookie('new_mailhost') != null)
document.LoginForm.new_mailhost.value=GetCookie('new_mailhost');
if (GetCookie('new_return_address') != null)
document.LoginForm.new_return_address.value=GetCookie('new_return_address');
}
</script>
</head>
</HEAD>
<BODY BGCOLOR="#e0f0e0" onload="setValues()">
<FORM ACTION="mailbox.remotemail$[xid]" METHOD=POST TARGET="mailboxFrame" NAME="LoginForm">
<TABLE BGCOLOR="#d0e0d0" CELLSPACING="5">
<TR>
<TD ALIGN=RIGHT>
<FONT SIZE="-2" FACE="geneva, verdana">POP login name</FONT>
</TD>
<TD ALIGN=LEFT><INPUT TYPE=TEXT NAME="new_user" SIZE="50" onChange="setC(this)"></TD>
</TR>
<TR>
<TD ALIGN=RIGHT>
<FONT SIZE="-2" FACE="geneva, verdana">password</FONT>
</TD>
<TD ALIGN=LEFT><INPUT TYPE=PASSWORD NAME="new_password" SIZE="50"></TD>
</TR>
<TR>
<TD ALIGN=RIGHT>
<FONT SIZE="-2" FACE="geneva, verdana">POP host name</FONT>
</TD>
<TD ALIGN=LEFT><INPUT TYPE=TEXT NAME="new_mailhost" SIZE="50" onChange="setC(this)"></TD>
</TR>
<TR>
<TD ALIGN=RIGHT>
<FONT SIZE="-2" FACE="geneva, verdana">return address</FONT>
</TD>
<TD ALIGN=LEFT><INPUT TYPE=TEXT NAME="new_return_address" SIZE="50" onChange="setC(this)"></TD>
</TR>
<TR>
<TD ALIGN=RIGHT>
</TD>
<TD ALIGN=CENTER><INPUT TYPE=SUBMIT VALUE="log In"></TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>